// 创建userModel
const mongoose = require('mongoose')

// 创建schema

const cateSchema = new mongoose.Schema({
  cateName: {
    type: String,
    required: true
  },
  cateIcon: String,
  cateDesc: String, // 分类描述
  pid: {
    type: String,
    default: 0 // 0顶层分类
  }
})

// 创建model
const cateModel = mongoose.model('qf_cates', cateSchema)

module.exports = cateModel